import request from '@/utils/request'
//获取题目列表
export function fetchQuestionList(data) {
  return request({
    url: '/api/v1//questions/getAll',
    method: 'post',
    data: data
  })
}

//获取题目详情
export function getQuestionDetail(id) {
  return request({
    url: '/api/v1/questions/detail/'+id,
    method: 'post'
  })
}

//新增或编辑题目
export function saveQuestion(data){
  return request({
      url: '/api/v1/questions/add',
      method: 'post',
      data: data
  })
}

//删除题目
export function deleteQuestion(id){
  return request({
      url: '/api/v1/questions/delete/'+id,
      method: 'post'
  })
}







